#include<algorithm>
#include<cstdio>
#include<math.h>
using namespace std;
int main(){
    //freopen("in.txt","r",stdin);
    int N;
    long long p;
    scanf("%d %lld",&N,&p);
    long long inp[N];
    for(int i=0;i<N;i++){
        scanf("%lld",&inp[i]);
    }
    sort(inp,inp+N);
    int result=0;
    for(int i=0;i<N;i++){
        result=max((int)(upper_bound(inp,inp+N,inp[i]*p)-(inp+i)),result);
    }
    printf("%d\n",result);
}